using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace ERP.Migrations
{
    public partial class AddUserManagementMenu : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.InsertData(
                table: "Menus",
                columns: new[] { "Id", "Name", "Url", "Icon", "ParentId", "OrderNum", "PermissionCode", "CreationTime" },
                values: new object[] { 1, "系统管理", "", "layui-icon-set", null, 1, 1, DateTime.Now }
            );

            migrationBuilder.InsertData(
                table: "Menus",
                columns: new[] { "Id", "Name", "Url", "Icon", "ParentId", "OrderNum", "PermissionCode", "CreationTime" },
                values: new object[] { 2, "用户管理", "/RBAC/UserView", "layui-icon-user", 1, 1, 1, DateTime.Now }
            );
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "Menus",
                keyColumn: "Id",
                keyValue: 2
            );

            migrationBuilder.DeleteData(
                table: "Menus",
                keyColumn: "Id",
                keyValue: 1
            );
        }
    }
} 